import { defineStore } from "pinia";
export const useHomeStore = defineStore('home', { // 公用的
    // state: ()=>({name: 'alice',count: 0}),
    state: () => {
        return {
           welcomeText: ['上午好，要开心每一天！', '下午好，喝杯咖啡提提神吧！']
        }
    },
    getters: {
        doubleCount: (state) => state.count * 2,
        // doublePlusOne:(state)=> state.doubleCount+1

    },
    actions: {
        increment() {
            this.count++
        },
        changeIsCollapse() {
            this.isCollapse = !this.isCollapse
        }

    }
})
